package com.deft.design.appearance.web;

import com.deft.design.appearance.annotation.DoDoor;
import com.deft.design.appearance.domain.UserInfo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Hide丶love
 * @date 2022/05/01
 **/
@RestController
public class HelloWorldController {

    @DoDoor(key = "userId", returnJson = "{\"code\":\"1111\",\"info\":\"⾮⽩名单可访问⽤户拦截！\"}")
    @GetMapping("/api/queryUserInfo")
    public UserInfo queryUserInfo(@RequestParam String userId) {
        return new UserInfo("虫虫：" + userId, 19, "深圳市南山区侨香路4068号");
    }
}
